package com.fpd.enums;

/**
 * 发函状态枚举
 *
 * @author Monster
 */
public enum SendResultEnum {
	PASS("0", "允许发函"),
	NO1("1", "F类不允许发函"),
	NO2("2", "失信不允许发函"),
	NO3("3", "评分大于80不能发函"),
	NO4("4", "重复委案不允许发函"),
	NO5("5", "共债不允许发函"),
	NO6("6", "已经发过两次函"),
	NO7("7", "非AB类重复委案不允许发函"),
	NO8("8", "没有发函地址"),
	NO9("9", "重复委案不能二次发函"),
	NO10("10", "家户同址不能二次发函"),
	NO11("11", "已跟进不能二次发函"),
	NO12("12", "已添加回款不能二次发函"),
	NO13("13", "1-3号才能二次发函"),
	NO14("14", "非AB类重复委案不能二次发函"),
	NO15("15", "不允许跨月二次发函"),
	NO16("16", "当月只能发一次"),
	NO17("17", "共债且失信不允许发函"),
	NO18("18", "没有本人电话"),
	NO19("19", "密保件不允许二次发函");

    private String value;
    private String name;

    SendResultEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(String value) {
        for (SendResultEnum ate : SendResultEnum.values()) {
            if (value.equals(ate.getValue())) {
                return ate.getName();
            }
        }
        return "";
    }
}
